home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1996 #6
/
Amiga Plus CD - 1996 - No. 06.iso
/
pd
/
daten
/
graph3d
/
graph3d.doc
< prev
next >
Wrap
Text File
|
1996-04-29
|
7KB
|
188 lines
Graph3D V1.43
(Freeware)
Hidden-line 3-dimensional diagrams
1. Introduction
---------------
The name "Graph3D" is derived from GRAF3D(), a subroutine in DISSPLA, the
great Fortran plotting package for mainframes. In those days of 1991, while
at the university, I had indeed some business to do with DISSPLA. And
because I was impressed with the pretty hidden-line diagrams in the user's
manual, I just had to program something like that myself. The first result
was a BASIC program %-(, but it worked, and at least I managed to port it
to Pascal later. Unfortunately I abused Graph3D to try system programming
tricks, and eventually the source code became such a mess that I lost
interest and let the program rot away in its drawer. It wasn't until last
autumn (1995) that I decided to give it the finishing touch and publish it,
at last.
I'm telling all this to explain the following weird collection of features:
- supports CLI and Workbench startup parameters, uses a filerequester,
but only "req.library"
- more or less font sensitive, 2.0 look and feel, but is still 1.3
compatible
2. Input files
--------------
The tables to be plotted are read from ASCII files, the filename extension
should be ".3D". The input format isn't too hard to guess, just look at
some of the examples in the "data/" drawer. I'd recommend "LibHistory.3D",
it is easy to read. Even if you have already deleted all example files, you
can always create one by saving the built-in demo data. (Load the program,
then type (right Amiga)-S, and a file "RAM:Demo.3D" will be created.)
Oh, one more thing: At the bottom of each file, starting with the keyword
"INFO", is information representing some program settings, like the
precise dimensions of your diagram. These lines are written to every file
that Graph3D saves itself, but are not needed (and not recommended) for
files that you create manually.
A special kind of example file is "Function.3D". The file itself is nothing
much to look at (too huge), but the Pascal program that created it is more
interesting: "funcgen.p". It should be no problem to translate it to your
favourite programming language (C, ARexx, BASIC or whatever). That would
make a somewhat awkward but universal function plotter on grids of up to
100×100 points.
3. The Menus
------------
The following is not intended as a complete user's manual, but rather as
some comments on not so obvious features.
3.1. Project
------------
The menu items "Open" and "Save as" are ghosted if you don't have the
"req.library" installed. That's not a tragedy, you can still specify input
files by command line parameter or by extended selection on the Workbench.
It just means that you have to restart the program for each new set of
data.
The functions "Save" and "Save & Quit" are executed immediately and without
safety requesters. All else would be ridiculous, because you cannot change
any data from within the program, you can merely rearrange them.
But there are two exceptions where you can damage your input data just by
loading and saving them: If a freshly created file contains a typing error
(perhaps just a missing line), "Save" will "correct" this error in a way
you won't necessarily like. And if your file is larger than 100 columns or
lines of data (unlikely, and you will be warned by a requester), only part
of it will be read, and you shouldn't write these data back to disk,
either.
"Quit" is executed without a safety requester, too. The close gadget has
the same effect.
3.2. Data
---------
These functions allow you to regroup your data to obtain better diagrams.
In most cases a text editor would do as well, but not as easy and reliable.
"Swap axes" is what mathematicians call "transpose": lines become columns
and vice versa. Data of one "column" are those from subsequent lines in
the input file.
To move a line or column you must enter its number and a destination
number. You have as many attempts as you like to guess the right numbers
(if you're too lazy to count ;-), the requester doesn't go away until you
click "OK". Note that entering names in the string gadgets on the right is
pointless, those names are only displayed for your information.
3.3. Display
------------
"Dimensions/Find best" is only for emergencies, when you have entered
hopelessly bad dimensions that mess up the display. Usually you will wish
to choose more sensible upper and lower bounds than the program can do in
its simple-mindedness. B.t.w., when first reading a file with no INFO-block
attached, the program executes just this function.
"Dimensions/Snapshot" and "Recall" are neat to transfer the dimensions of
one diagram to another, if this emphasizes the statement of a series of
tables. I used this on the files "RSort.3D", "Random.3D" and "Sort.3D".
"Fancy texts" may look somewhat ridiculous, as only the texts, not the
characters themselves are aligned in space. But that's the lesser of two
evils, just try and switch this feature off. Only when you use Graph3D to
plot functions and have negative numbers as axis titles, you will find that
minus signs are much better to read with horizontally aligned texts.
"Draw" and "Halt" do the same as the pencil and the cross out gadget on the
window border. "Halt" is needed mainly to stop automatic refreshs :-).
"Auto redraw as ... Sketch" is useful when you notice that you have to use
the cross out gadget much too often (especially on 68000 Amigas). "Auto
redraw as ... Diagram" is generally better, because it gives you a better
idea of what you're doing. Please note that you can minimize the number of
automatic refreshs by the standard intuition feature "extended menu
selection": Keep the right mouse button pressed and click on additional
menu items at the same time. All selected actions will be executed after
you release the RMB, and a diagram refresh will take place only once after
that, if necessary at all.
3.4. Outfit
-----------
"Interlace" should be permanently switched on, MedRes diagrams look too
brain-damaged. Well, like I told you: I used Graph3D to practise system
programming, an I built in everything I could think of. (At a time when
there was no such thing like screenmode requesters ... %-)
"Colors: Workbench" doesn't seem to do the right thing under Kick 2.0 any
more. You get the default Workbench colors instead of the actual colors.
(I admit that I don't really examine the Workbench screen, but just call
GetPrefs().)
"Palette" works only, if you have the "req.library" installed. There's not
much use for this feature anyway, except perhaps forcing a white background
for printer hardcopies.
"Font" selection is not yet implemented. But you can get some nice results
using the 2.0 "Font" preferences command. ;-)
4. The Gadgets
--------------
The prop gadgets adjust bearing and elevation of the eye of the beholder.
The magnifying glass and the binoculars are used to zoom in and out.
(Perhaps you like wide-angle lens effects? But don't exaggerate it. :)
As mentioned above, the pencil and cross out gadget are equivalent to the
menu items "Draw" and "Halt".
5. Credits
----------
Author:
Wilhelm Noeker
Hertastr. 8, D-44388 Dortmund
E-Mail: 0231601698-1@btxgate.de
Compiler:
KICK-Pascal 2.12 by MAXON Computer
Icons for the data files by:
Magnus Enarsson